package com.elasticsearch.demo.dao;

import com.elasticsearch.demo.model.Item;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface ItemRepository extends ElasticsearchRepository<Item, Long> {

    /**
     * 根据价格区间查询
     *
     * @param price1
     * @param price2
     * @return
     */
    List<Item> findByPriceBetween(double price1, double price2);


    /**
     * @Author xieshanzhong
     * @Description 内容提示
     * @Date 19:27 2022/3/22
     * @Param
     * @return
     **/
    List<Item> findItemByBrandAndAndId(String brand, Long itemId);


    List<Item> findAllByBrandAndAndId(String brand, Long itemId);
}
